<%--
  Created by IntelliJ IDEA.
  User: 陈俊雄
  Date: 2018/5/9
  Time: 9:42
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<!-- Main view -->
<div class="animated fadeInRight">
    <div class="wrapper wrapper-content ng-scope" ng-controller="acquirerAccountCtrl">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{{ 'ACQUIRER_ACCOUNT' | translate }}</h5>
                    </div>
                    <div class="ibox-content sk-loading">
                        <div class="sk-spinner sk-spinner-wave">
                            <div class="sk-rect1"></div>
                            <div class="sk-rect2"></div>
                            <div class="sk-rect3"></div>
                            <div class="sk-rect4"></div>
                            <div class="sk-rect5"></div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 col-md-6 col-lg-1-5">
                                <div class="form-group form-group-sm">
                                    <div class="input-group">
                                        <span class="input-group-addon">名称：</span>
                                        <input type="text" class="form-control" ng-model="searchInfo.name">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-1-5">
                                <div class="form-group form-group-sm">
                                    <div class="input-group">
                                        <span class="input-group-addon">收单机构：</span>
                                        <select class="form-control b-r-sm" ng-model="searchInfo.acquirerId"
                                                ng-options="x.id as x.name for x in acquirer">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-1-5">
                                <div class="form-group form-group-sm">
                                    <div class="input-group">
                                        <span class="input-group-addon">结算币种：</span>
                                        <select class="form-control b-r-sm" ng-model="searchInfo.currency"
                                                ng-options="x.firstValue as x.name for x in currency">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-1-5">
                                <div class="form-group form-group-sm">
                                    <div class="input-group">
                                        <span class="input-group-addon">状态：</span>
                                        <select class="form-control b-r-sm" ng-model="searchInfo.status"
                                                ng-options="x.firstValue as x.name for x in accountStatus">
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-1-5">
                                <div class="form-group form-group-sm">
                                    <div class="input-group">
                                        <span class="input-group-addon">创建人：</span>
                                        <input type="text" class="form-control" ng-model="searchInfo.creator">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-1-5">
                                <div class="form-group form-group-sm">
                                    <div class="input-group">
                                        <span class="input-group-addon">修改人：</span>
                                        <input type="text" class="form-control" ng-model="searchInfo.modifier">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 col-md-6 col-lg-3 col-lg-offset-3">
                                <button class="btn btn-sm btn-w-m btn-primary pull-right" ng-click="search(searchInfo)">
                                    查询
                                </button>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-3">
                                <button class="btn btn-sm btn-w-m btn-info" ng-click="reset()">
                                    重置
                                </button>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <button class="btn btn-sm btn-primary" ng-click="showModal(0)">新增</button>
                        <div class="table-responsive">
                            <table ng-table="acquirerAccountTable"
                                   class="table table-condensed table-striped table-hover table-bordered">
                                <tr ng-repeat="row in $data">
                                    <td class="text-center p-6" style="width: 35px">
                                        <input type="checkbox" ng-model="selected[row.id]">
                                    </td>
                                    <td class="text-center" data-title="'名称'">
                                        {{row.name}}
                                    </td>
                                    <td class="text-center" data-title="'收单机构'">
                                        {{row.acquirerId | getValueByList : acquirer : 'id' : 'name'}}
                                    </td>
                                    <td class="text-center" data-title="'银行账户'">
                                        {{row.account}}
                                    </td>
                                    <td class="text-center" style="max-width: 70px" data-title="'结算币种'">
                                        <div class="hidden-text" uib-tooltip="{{row.currencyCN}}">
                                            {{row.currencyCN}}
                                        </div>
                                    </td>
                                    <td class="text-center" data-title="'单笔限额'">
                                        {{row.singleQuota}}
                                    </td>
                                    <td class="text-center" data-title="'日限额'">
                                        {{row.dayQuota}}
                                    </td>
                                    <td class="text-center" data-title="'月限额'">
                                        {{row.monthQuota}}
                                    </td>
                                    <td class="text-center" data-title="'成功率'">
                                        {{row.success}}
                                    </td>
                                    <td class="text-center" data-title="'拒付率'">
                                        {{row.dishonor}}
                                    </td>
                                    <td class="text-center" style="max-width: 70px" data-title="'备注'">
                                        <div class="hidden-text" uib-tooltip="{{row.remark}}">
                                            {{row.remark}}
                                        </div>
                                    </td>
                                    <td class="text-center" data-title="'创建人'">
                                        {{row.creator}}
                                    </td>
                                    <td class="text-center" data-title="'修改人'">
                                        {{row.modifier}}
                                    </td>
                                    <td class="text-center" data-title="'修改时间'">
                                        {{row.modifyTime | date : 'yyyy/MM/dd HH:mm:ss'}}
                                    </td>
                                    <td class="text-center p-6" style="width: 110px" data-title="'操作'">
                                        <constant-status-btn-width-edit-btn row="{{row}}"
                                                                            status-constant="{{accountStatus}}"
                                                                            status-change="statusChange($event, row)"
                                                                            edit="edit(type, row)"></constant-status-btn-width-edit-btn>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <button class="btn btn-sm btn-primary pull-left" ng-click="del()" ng-disabled="delDisabled()">
                            删除
                        </button>
                        <my-pagination table-param="acquirerAccountTable"></my-pagination>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>